package cn.wolfcode.wolf2w.repository;

import cn.wolfcode.wolf2w.domain.TravelComment;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;

/**
 * 游记评论持久化接口
 */
public interface TravelCommentRepository extends MongoRepository<TravelComment,String> {

    /**
     * 获取游记下的评论
     * @param travelId
     * @return
     */
    List<TravelComment> findByTravelIdOrderByCreateTime(String travelId);
}
